#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "MSTK.h"


#ifdef __cplusplus
extern "C" {
#endif

  /* 
     This function receive mesh from processor rank in communicator comm
     
     mesh should be allocated before this call.
  */
int MESH_RecvMesh(Mesh_ptr mesh, int dim, int rank, MPI_Comm comm) {

  if (dim == 3)
    MESH_Vol_RecvMesh(mesh,rank,comm);
  else if(dim == 2) 
    MESH_Surf_RecvMesh(mesh,rank,comm);
  else {
    fprintf(stdout,"\n can only receive surface or volume mesh1111\n");
    exit(-1);
  }
  return 1;
}
  
#ifdef __cplusplus
}
#endif

